package com.baoming.dao;

import java.io.Serializable;
import java.util.Collection;
import java.util.LinkedHashMap;
import java.util.List;

import com.baoming.util.PageInfo;
 

public interface ICommonDao<T> {
 
	void save(T t);
 
	void update(T t);
 
	T findObjectById(Serializable tid);
  
	void deleteObjectByCollection(Collection<T> entities);
	 
	void deleteObjectById(Serializable... tid) ; 
 	
	List<T> findCollectionByConditionNoPage(String hqlWhere, Object[] params,
			LinkedHashMap<String, String> orderby);
 
	List<T> findCollectionByConditionWithPage(String hqlWhere,
			final Object[] params, LinkedHashMap<String, String> orderby,
			final PageInfo pageInfo);
 
	void saveObjectByCollection(Collection<T> entities);
 
	int selectMaxRow(T t) ; 
}
